package NGUYENNGOCHUNG;

public class NVGAME {
	// 1.bien toan cuc. datafield
	/*
	 * c la bien khai bao ben ngoai ca phuong thuc - thuoc tinh pham vi ben tron
	 * cua doi tuong nay mac dinh cua bien toan cuc la "public"
	 */
	private String tennv;
	private int capdo;
	private String kynang;
	private String binhkhi;

	/*
	 * public void Vidu01(){ int manv = 10; tennv ="songoku"; } public void
	 * Vidu02(){ // ma nhan vat bao loi. // ten nv van bt tennv="chudu"; }
	 */
	// 2. ham khoi tao
	/*
	 * dac diem cua ham khoi tao + la ham duoc chay dau tien nhat khi doi tuong
	 * duoc sinh ra. + mac dinh la public + trung ten vs class + khi lop khong
	 * dinh nghia ham khoi dung khi tao ra lop doi tuong --> ham khoi dung khong
	 * tham so duoc tao ra. + nhung neu co ham khoi dung co tham so --> thi
	 * khong the tu tao ra ham khoi dung khong tham so. + co 2 dang khoi dung +
	 * k the goi no truc tiep --> ma chi goi thong qua viec khoi tao doi tuong.
	 * + khong co gia tri tra ve 1. khong tham so 2. co tham so
	 */
	// ham khoi dung khong tham so
	public NVGAME() {
		// su dung de khoi tao thong tin mac dinh cho doi tuong
		tennv = "tuska";
		capdo = 25;
		kynang = "tusk";
		binhkhi = "bua";
	}

	// ham khoi dung co tham so
	NVGAME(String tennv, int capdo, String kynang, String binhkhi) {
		// su dung de khoi tao thong tin theo thong so dien vao
		// cu phap"
		//<bien toan cuc>=<tham so>;
		this.tennv = tennv;
		this.capdo = capdo; 
		this.kynang = kynang;
		this.binhkhi = binhkhi;
		
	}
	
	
	//3. thuoc tinh cua doi tuong
		/*la phuong thuc bieu dien thong tin cho cac data field trong lop doituong
		 * (get or set)
		 * + get : tra lai thong tin datafield tam thoi ve cho views
		 * + set : thiet lap thong tin cho doi tuong qua data field.
		 * */
		
		

	public String getTennv() {
		return tennv;
	}

	public void setTennv(String tennv) {
		this.tennv = tennv;
	}

	public int getCapdo() {
		return capdo;
	}

	public void setCapdo(int capdo) {
		this.capdo = capdo;
	}

	public String getKynang() {
		return kynang;
	}

	public void setKynang(String kynang) {
		this.kynang = kynang;
	}

	public String getBinhkhi() {
		return binhkhi;
	}

	public void setBinhkhi(String binhkhi) {
		this.binhkhi = binhkhi;
	}

		/*4. hanh vi cua doi tuong
		 * 
		 * 
		 * 
		 * */
	public String Bay( int tocdo){
		return "Bay voi toc do "+ tocdo;
	}

}
